<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>JS基础语法</title>
</head>
<body>
<script>
  var count  = 3;
  if(count == 3){
    alert(count);
  }
</script>
<script>
    let summ = 3.4
    let sum = 0;
    let a = "asd";
    var b;
    console.log(typeof summ, typeof sum, typeof a, typeof b)
    for (let i = 1; i <= 100; i++){
        sum += i;
    }
    alert(sum);
</script>
<script>
    var sum = 0;
    var i = 1;
    while (i <= 100){
        sum += i;
        i++;
    }
    alert(sum)
</script>
<script>
    function sum(a,b){
        return a + b;
    }
    var result = sum(1,2);
    console.log("result="+result);
</script>
<script>
    let total= function (a,b){
        return a+b;
    }
    var Result = total(9,2);
    console.log("Result="+Result);
</script>
</body>
</html>